package com.hxy.myRule;

import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//自定义Rule配置
@Configuration
public class MyRuleConfig {

    @Bean
    public IRule myRule(){
        //默认是轮询，现在使用自定义的轮询算法
        return new MyRandomRule();
    }

}
